<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <link rel="stylesheet" href="http://cdn.staticfile.org/cesium/1.69.0/Widgets/widgets.css">
    <link rel="stylesheet" href="../css//index.css">
</head>

<body>
    <div class="fun-menu">
        <button onclick="load()">视域分析</button>
        <button onclick="clear1()">清空</button>
    </div>
    <div id=cesiumContainer></div>

    <script src="http://cdn.staticfile.org/cesium/1.69.0/Cesium.js"></script>

    <script src="../libs/cpc/index.js"></script>
    <script>
        const map = new cpc.Map({
            container: "cesiumContainer",
            baseMaps: [
                {
                    type: "TDTImageryLayer",
                    mold: "image",
                    tk: "7b435c61bff7f77eb49206e10d6397bd",
                },
            ],
        });
        var tilt3dLayer = new cpc.Tile3dLayer({
            // url: "http://localhost/title3d/zy3dtiles/tileset.json"
            url: "http://data.marsgis.cn/3dtiles/qx-shequ/tileset.json",
        })
        tilt3dLayer.when(() => {
            tilt3dLayer.setHeight(10);
            tilt3dLayer.flyTo();
        })
        map.add(tilt3dLayer);

        function load() {
            map.visualAnalysis.activate();
        }
        function clear1() {
            map.visualAnalysis.clear();
        }
    </script>
</body>

</html>